home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Delphi 5 Companion Tools CD / FreeWare / HVDLL / HVDLL.ZIP / ImpImpTestDll.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-04  |  857 b   |  25 lines

  1. unit ImpImpTestDll;
  2. { This is the traditional way of importing DLLs. It works fine and requires
  3.   very little code, but the DLL is linked implicitly, meaning the OS will attempt
  4.   to load the DLL at startup. If the DLL is not available, the application will
  5.   not load. Also, startup can be slowed down considerably if there are many
  6.   large DLLs to be loaded. }
  7. interface
  8.  
  9. procedure Routine1(A, B, C, D: integer); register;
  10. procedure Routine2(A, B, C, D: integer); pascal;
  11. procedure Routine3(A, B, C, D: integer); cdecl;
  12. procedure Routine4(A, B, C, D: integer); stdcall;
  13.  
  14. implementation
  15.  
  16. const
  17.   TestDllName = 'TestDll.Dll';
  18.  
  19. procedure Routine1; external TestDllName;
  20. procedure Routine2; external TestDllName name 'Routine2';
  21. procedure Routine3; external TestDllName index 3;
  22. procedure Routine4; external TestDllName index 4;
  23.  
  24. end.
  25.